package Iterator;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class PancakeHouseShop {
    List<Menu> menuItems;
    public PancakeHouseShop(){
        this.menuItems=new ArrayList<>();
        addItem("可乐",3);
        addItem("汉堡",12);
        addItem("薯条",8);
        addItem("鸡翅",9);
    }
    public void addItem(String name,double price){
        Menu menu=new Menu(name,price);
        menuItems.add(menu);
    }
    public Iterator createIterator(){
        return new PancakeHouseMenuIterator(menuItems);
    }
}
